package com.sxz.sbs.module.amortize.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sxz.sbs.R;
import com.sxz.sbs.app.GlideApp;
import com.sxz.sbs.module.amortize.AmortizeBankBean;

import java.util.List;

/**
 * @author : tian
 *         time   : 2018/03/21
 *         desc   :
 */

public class SelectBankAdapter extends BaseQuickAdapter<AmortizeBankBean,BaseViewHolder>{
    public SelectBankAdapter(@Nullable List<AmortizeBankBean> data) {
        super(R.layout.item_select_bank_layout,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AmortizeBankBean item) {
        GlideApp.with(mContext).load(item.getPhotoUrl())
                .circleCrop().into((ImageView) helper.getView(R.id.iv_select_bank));
        helper.setText(R.id.tv_select_bank_name,item.getBankName());
        if (helper.getAdapterPosition() == 0) {
            helper.setVisible(R.id.iv_select,true);
        }
    }
}
